﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace QRCode
{
    public partial class FrmMain2 : Form
    {
        public FrmMain2()
        {
            InitializeComponent();
        }

        private void btnGenerate_Click(object sender, EventArgs e)
        {
            String msg = tbMsg.Text.Trim();


            try
            {


                String iconPath = "D:\\bitmap\\git\\1.jpg";
                Bitmap bitmap = Encoder.code(msg, 3, 10, iconPath, 10, 1, true);
                pictureBox1.Image = bitmap;
            }
            catch (Exception ex)
            {
                MessageBox.Show("输入字数不能大于25字符");
            }
        }
    }
}
